<template>
  <div class="app-container">
    <el-dialog :title="'详情（'+form.saleOrderNo+'）'" :visible.sync="dialogVisible" width="50%">
      <el-table
        :data="list"
        v-kiading="loading"
        max-height="500"
      >
        <el-table-column type="index" label="序号" align="center"></el-table-column>
        <el-table-column prop="title" label="商品/套餐名称" align="center"/>
        <el-table-column prop="priceType" label="类型" align="center" width="100">
          <template slot-scope="scope">
            <dict-tag :options="dict.type.ats_price_type" :value="scope.row.priceType"/>
          </template>
        </el-table-column>
        <el-table-column prop="skuName" label="商品规格" align="center" width="150"/>
        <el-table-column prop="quantity" label="商品数量" align="center" width="100"/>
        <el-table-column prop="unitPrice" label="商品单价(元)" align="center" width="100"/>
        <el-table-column prop="totalPrice" label="商品总价(元)" align="center" width="100"/>
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible=false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>



import {getSendGood} from "../../../../api/expressMng";

export default {
  dicts:['ats_price_type'],
  data() {
    return {
      loading: false,
      dialogVisible: false,
      form:{
        saleOrderNo:''
      },
      list: []
    }
  },
  methods: {
    show(form) {
      this.list=[]
      this.form.saleOrderNo=form.saleOrderNo
      this.dialogVisible = true
      this.getList(form.saleOrderNo)
    },
    getList(orderNo){
      this.loading=true
      getSendGood(orderNo).then(res=>{
        this.list=res.data
      }).finally(e => {
        this.loading = false
      })
    }
  }
}
</script>
